Skip to content

Support measurement_corpus #7906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Support measurement_corpus #7906

wants to merge 12 commits into from

Conversation

labbott
Copy link
Contributor

@labbott labbott commented Apr 2, 2025

No description provided.

@labbott labbott marked this pull request as draft April 2, 2025 17:58
@labbott labbott force-pushed the measurement_corpus branch from a2d6300 to 996d4fc Compare April 30, 2025 19:21
Copy link
Contributor

@andrewjstone andrewjstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@labbott This looks like a totally reasonable way forward to me. I don't see a reason to change direction.

CreateMeasurementDir,

/// Writing a measurement corpus
MeasurementCorpus { name: String },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this structure precludes anything I'm about to say. I'm just writing a note as I think about this.

We've talked about stacking multiple versioned corpuses so each TUF repo doesn't need to include the measurements for all versions. This would allow us to check for version N and N-1 measurement values without having to put both of them in one TUF repo. However, for installinator, for a mupdate of a single sled on an existing rack, we'd probably want to be able to include the last few versions of measurements in a TUF repo or have some other way to stack when doing a fresh install. The problem with the former is that we won't always require strict release upgrading from version N-1 to N in the future. The problem with the latter is we now need to be able to source the different manifests from wicket.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including previous versions of measurements in a TUF repo would get a little tricky and require some manual hand holding unless our automation gets a lot smarter. What I was planning to do is rotate the measurements from INSTALL to CLUSTER after an initial boot/attestation and have a set of all available measurements. I started trying to do that here but I struggled with finding a good spot to do the rotation.

std::fs::create_dir(
self.output_directory.join("measurements"),
)
.map_err(|error| WriteError::CreateDirError { error })?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to ignore an error if this path already exists? Should we have a delete step, since this is a "mupdate"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion on ignoring the error. The delete step should be covered by code further up the file where we clean everything out on install.

@labbott labbott force-pushed the measurement_corpus branch from e0062e4 to cb8de68 Compare May 14, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants